Skip to content

🐛 Bug Report: <Inbox /> not displaying #7398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
2 tasks done
StorytellerCZ opened this issue Dec 27, 2024 · 10 comments
Open
2 tasks done

🐛 Bug Report: <Inbox /> not displaying #7398

StorytellerCZ opened this issue Dec 27, 2024 · 10 comments
Labels
bug Something isn't working Inbox

Comments

@StorytellerCZ
Copy link

📜 Description

When trying to get the Inbox component running on my Meteor + React setup I get the following error:

Error: Client-only API called on the server side. Run client-only code in onMount, or conditionally run client-only component with <Show>

I believe this to be related to this: solidjs/solid-start#1679

👟 Reproduction steps

  1. Create a new Meteor React application meteor create meteor-novu --typescript
  2. Add Novu Inbox meteor npm i --save @novu/react
  3. Add the Inbox component into any of the imports/ui components
  4. Run Meteor meteor

👍 Expected behavior

Inbox should display or at the very least the usual default text of the rest of the application should show.

👎 Actual Behavior with Screenshots

Blank page with the error in console (will be caught by error boundary if implemented):
image

Novu version

Novu SaaS

npm version

2.6.3

node version

22.11.0

📃 Provide any additional context for the Bug.

As mentioned I think this is related to this bug: solidjs/solid-start#1679
I tried to implement the Inbox also via @novu/js, but with the same result. The discussion in Solid suggest that it might be something specific in Vite and version mismatch over a monorepo. This would suggest that this might be a build issue. Meteor has the option to recompile NPM packages, but that did not help (but maybe I was targeting the wrong package).

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to submit PR?

None

Copy link

linear bot commented Dec 27, 2024

@lamhidra-hamza
Copy link

I'm having the same issue, @StorytellerCZ any updates?

@SokratisVidros
Copy link
Contributor

Thanks for reporting! We will have a look at this ASAP and get back to you.

@SokratisVidros SokratisVidros added the Inbox label Feb 5, 2025 — with Linear
@SokratisVidros SokratisVidros added the Missing Designs Created by Linear-GitHub Sync label Feb 13, 2025 — with Linear
@SokratisVidros SokratisVidros removed the Missing Designs Created by Linear-GitHub Sync label Feb 13, 2025
@StorytellerCZ
Copy link
Author

Any updates on this?

@SokratisVidros
Copy link
Contributor

@StorytellerCZ, @novu/js is a client only for now as it relies on Solid Web. We recommend ensuring that @novu/js is only included in the client-side bundle. I am unfamiliar with the latest Meteor, but is there a way to teach Meteor to include @novu/js only for client code?

@StorytellerCZ
Copy link
Author

StorytellerCZ commented Apr 7, 2025

Meteor uses Babel and Reify under the hood for the build system. I can force Meteor to rebuild specific NPM packages, but I', not sure that would have any effect here. For my setup I'm using React only on client side (no SSR or anything like that), so that is why the error is confusing to me.

UPDATE: Tried Meteor's recompile option for client, but that did not help.

@StorytellerCZ
Copy link
Author

Tried today with AI to do some crazy fixes with lazy imports, useEffects and so on, but no solution has been found.
The AI believes that:

The Novu package is likely running some initialization code as soon as the module is evaluated, even when loaded inside useEffect or after mount.

@SokratisVidros I just want to reiterate that there is no SSR or React code running on the server in my setup. I will now try to just implement things via the js package which seems to work without issues so far.

@StorytellerCZ
Copy link
Author

Same issue when trying to create Inbox via @novu/js/ui.

@BiswaViraj BiswaViraj removed their assignment Apr 24, 2025
@SokratisVidros
Copy link
Contributor

Since Meteor full stack, so there must be a leakage of the Novu NPM package to the server bundler, generated by Meteor. @StorytellerCZ would it be possible to put together a reproduction repo so that we can work on it on our end?

@StorytellerCZ
Copy link
Author

StorytellerCZ commented Apr 27, 2025

@scopsy scopsy added the bug Something isn't working label May 6, 2025 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Inbox
Projects
None yet
Development

No branches or pull requests

5 participants